import $axios from "./$axios.js"

export const payment = async () => {
  return await $axios({
    url: '/api/payment'
  })
}

export const indent_add = async (delivery_address_id, price, items) => {
  return await $axios({
    method: 'post',
    url: '/api/indent/add',
    data: {
      delivery_address_id,
      price,
      items
    }
  })
}

export const indent_del = async (id) => {
  return await $axios({
    method: 'delete',
    url: '/api/indent/del',
    params: {
      id
    }
  })
}

export const indent_update = async (id, status) => {
  return await $axios({
    method: 'put',
    url: '/api/indent/status',
    data: {
      id,
      status
    }
  })
}

export const indent_all = async () => {
  return await $axios({
    url: '/api/indent'
  })
}